package com.matrix.java.chap_05.example;

import java.util.Scanner;

public class Case5_03 {
    public static void main(String[] args) {
        int num = (int) (Math.random() * 101);
        System.out.print("input: ");
        Scanner input = new Scanner(System.in);
        int guessNum = input.nextInt();
        while (guessNum != num) {
            if (guessNum > num) {
                System.out.println("大");
            } else {
                System.out.println("小");
            }
            System.out.print("wrong!again: ");
            guessNum = input.nextInt();
        }
        System.out.println("correct!");
        input.close();
    }
}
